package cate.game.role.pvp.guildwar.msg;

import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBGuildWar;
import easy.java.dev.note.NoteField;
import easy.java.practice.errorcode.EcResult;

@ClientMsg(title = "公会战 领取宝箱奖励 の 请求")
public class GuildWarGetBoxRwdReq implements MsgInput {

    @NoteField("位置")
    public int pos;

    @Override
    public void execute(GameBody game, ClientContext cc) {
        EcResult<Void> r = cc.getRole().getPvp().guildWar.getBoxRwd(pos);
        game.notice.message(cc.getRole(), r,true);
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBGuildWar.GET_BOX_RWD;
    }
}
